require "rubygems"
require "rake"
require "rake/gempackagetask"
require "rake/testtask"

desc "Run basic tests"
Rake::TestTask.new("test") { |t|
  t.pattern = "#{File.dirname(__FILE__)}/tests/**/*_test.rb"
  t.libs << "#{File.dirname(__FILE__)}/lib"
  t.libs << "#{File.dirname(__FILE__)}/tests"
  t.verbose = true
  t.warning = true
}

spec = Gem::Specification.new do |s|
  s.name = "Wondercap"
  s.version = "0.1.0"
  s.author = "Michael Bushkov"
  s.email = "mbushkov@demax.ru"
  s.homepage = "http://code.google.com/p/wondercap/"
  s.platform = Gem::Platform::RUBY
  s.summary = "Extension to Capistrano that can be especially useful while working with a number (>3) of projects with similar deployment configurations"
  s.files = FileList["{bin,lib}/**/*"].to_a
  s.test_files = Dir['tests/**/*_test.rb']
  s.require_path = "lib"
  s.default_executable = "bin/wcap"
  s.add_dependency("activerecord", ">= 2.0.0")
  s.add_dependency("capistrano", ">= 2.3.0")
  s.add_dependency("open4", ">= 0.9.0")
end

Rake::GemPackageTask.new(spec) do |pkg| 
  pkg.need_tar = true 
end 
